<template>

<div class="page-nation">
  <div class="pagation">
    <el-pagination
        background
        layout="prev, pager, next"
        @current-change="handleCurrentChange"
        :total="total"
        >
    </el-pagination>
  </div>
</div>
</template>

<script>
// 分页的组件
export default {
name: "index",
  props:{
    total:{
      type:Number,
      default:0
    }
  },
data(){
return{

}

},
methods:{
  //点击分页来获取不同的数据
  handleCurrentChange(val) {
    // this.start=val;
    // this.getList()
    this.$emit("changepage",val)
  }
}
}
</script>

<style lang="scss" scoped>
  .pagation{
    margin: 30px 0px 30px 450px;
  }
</style>
